package com.dove.ohpm.service

import com.intellij.openapi.components.PersistentStateComponent
import com.intellij.openapi.components.Service
import com.intellij.openapi.components.State
import com.intellij.openapi.components.Storage
import com.intellij.util.xmlb.XmlSerializerUtil

@Service
@State(name = "UISettingConfigState", storages = [Storage("ohpm-ui-setting-state.xml")])
class UISettingConfigState: PersistentStateComponent<UISettingConfigState> {
    var hostUrl = ""
    var hostPort = 0
    var hostSchema = "http"
    override fun getState(): UISettingConfigState {
        return this
    }

    override fun loadState(state: UISettingConfigState) {
        XmlSerializerUtil.copyBean(state, this)
    }
}